Public Class TableSize_Factory
    Public Function AverageWeeklyDatabaseSize( _
                            ByVal lCountOfWeeks As Long, _
                            ByVal lDatabaseID As Long) As DataTable

        Dim oFactory As New DBTableSize_Factory

        Return oFactory.AverageWeeklyDatabaseSize(lCountOfWeeks, lDatabaseID)
    End Function

    Public Function AverageWeeklyTableSize( _
                            ByVal lCountOfWeeks As Long, _
                            ByVal lTableID As Long, _
                            ByVal sEndingWeek As String) As DataTable

        Dim oFactory As New DBTableSize_Factory

        Return oFactory.AverageWeeklyTableSize(lCountOfWeeks, lTableID, sEndingWeek)
    End Function

    Public Function TableAverageSizesForWeek( _
                        ByVal sWeek As String, _
                        ByVal lDatabaseID As Long) As DataTable

        Dim oFactory As New DBTableSize_Factory

        Return oFactory.TableAverageSizesForWeek(sWeek, lDatabaseID)
    End Function

    Public Sub RemoveExpiredData()
        Dim oConfiguration As New Config_Factory
        Dim iExpirationPeriod As Integer = oConfiguration.GetValueFromName("SIZE_RETENTION_PERIOD")

        Dim oFactory As New DBTableSize_Factory

        oFactory.RemoveExpiredData(iExpirationPeriod)
    End Sub

    Public Sub RemoveSessionData(ByVal lSessionID As Long)
        Dim oFactory As New DBTableSize_Factory
        oFactory.RemoveSessionData(lSessionID)
    End Sub
End Class
